import java.util.ArrayList;

import ADTs.PointADT;
import ADTs.LevelStateADT;
import Gameplay.Level;
import Gameplay.Player;
import Gameplay.Enemy.*;
import Gameplay.Projectile.Projectile;
import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;


public class LevelStateADTTest  extends TestCase {
	public static Test sute(){
		return new TestSuite(LevelStateADT.class);
	}
	public void test1(){
		LevelStateADT state = new LevelStateADT();
		Player p = new Player();
		state.setPlayer(p);
		Assert.assertTrue(state.getPlayer().getHP() == p.getHP());
		Assert.assertTrue(state.getPlayer().getMaxHP() == p.getMaxHP());
		Assert.assertTrue(state.getPlayer().getWeapon() == p.getWeapon());
		Assert.assertTrue(state.getPlayer().getRadius() == p.getRadius());
	}
	public void test2(){
		LevelStateADT state = new LevelStateADT();
		ArrayList<Projectile> aList = new ArrayList<Projectile>();
		Projectile a1 = new Projectile(new PointADT(0,0), new PointADT(1,1));
		Projectile a2 = new Projectile(new PointADT(3,5), new PointADT(3,6));
		Projectile a3 = new Projectile(new PointADT(300,500), new PointADT(300,600));
		Projectile a4 = new Projectile(new PointADT(20,540), new PointADT(600,800));
		aList.add(a1);
		aList.add(a2);
		aList.add(a3);
		aList.add(a4);
		state.setProjectileList(aList);
		for(int i = 0; i < state.getProjectileList().size(); i++){
			if(i == 0){
				Assert.assertTrue(state.getProjectileList().get(i).equals(a1));
			}
			if(i == 1){
				Assert.assertTrue(state.getProjectileList().get(i).equals(a2));
			}
			if(i == 2){
				Assert.assertTrue(state.getProjectileList().get(i).equals(a3));
			}
			if(i == 3){
				Assert.assertTrue(state.getProjectileList().get(i).equals(a4));
			}
		}
	}
}
